package com.otv.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;




@Entity
@Table(name="point_vente")
public class PointDeVente {
	
	private Long id;
	private String nom;
	private String numero;
	private String adresse;
	private String ville;
	private String codepostal;
	private String telephone;
	private String fax;
	private Enseigne enseigne;
	private boolean candenced;
	
	@Id
	@GeneratedValue (strategy = GenerationType.AUTO)
	@Column(name="id", unique = true, nullable = false)
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name="nom")
	public String getNom() {
		return nom;
	}
	public void setNom(String nom) {
		this.nom = nom;
	}
	
	@Column(name="numero")
	public String getNumero() {
		return numero;
	}
	public void setNumero(String numero) {
		this.numero = numero;
	}
	
	@Column(name="adresse")
	public String getAdresse() {
		return adresse;
	}
	public void setAdresse(String adresse) {
		this.adresse = adresse;
	}
	
	@Column(name="ville")
	public String getVille() {
		return ville;
	}
	public void setVille(String ville) {
		this.ville = ville;
	}
	
	@Column(name="codepostal")
	public String getCodepostal() {
		return codepostal;
	}
	public void setCodepostal(String codepostal) {
		this.codepostal = codepostal;
	}
	
	@Column(name="telephone")
	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	
	@Column(name="fax")
	public String getFax() {
		return fax;
	}
	public void setFax(String fax) {
		this.fax = fax;
	}

	@ManyToOne()
	@JoinColumn(name="idEnseigne")
	public Enseigne getEnseigne() {
		return enseigne;
	}
	public void setEnseigne(Enseigne enseigne) {
		this.enseigne = enseigne;
	}
	
	
	@Column(name="cadenced") 
	public boolean isCandenced() {
		return candenced;
	}
	
	public void setCandenced(boolean candenced) {
		this.candenced = candenced;
	}

}
